package com.good.controller;

import java.util.HashMap;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.good.entity.Test1;
import com.good.service.Test1DemoService;

@Controller
public class TestEnumController {
	@Resource(name="test1DemoServiceImpl")
	private Test1DemoService test1DemoServiceImpl;
	@RequestMapping(value="enum",method=RequestMethod.GET)
	@ResponseBody
	public Map<String,Object> t1(){
		Map<String,Object> map=new HashMap<String, Object>();
		map.put("data", test1DemoServiceImpl.find(1L));
		return map;
	}
	@RequestMapping(value="testMulti",method=RequestMethod.GET)
	public void t2(){
		Test1 entity=new Test1();
		entity.setName("1");
		test1DemoServiceImpl.save(entity);
	}
}
